package cvar.model;

public class Variable implements Comparable<Object> {

  private String name_;
  
  public Variable(String name) {
    name_ = name;
  }

  public String getName() {
    return name_;
  }

  @Override
  public int compareTo(Object obj) {
    if (null != obj && obj instanceof Variable) {
      Variable var = (Variable) obj;
      return name_.compareTo(var.getName());
    } else {
      return 0;
    }
  }
  
  @Override
  public int hashCode() {
    return name_.hashCode();
  }
  
  @Override
  public String toString() {
    return name_;
  }

}
